package com.usian.admin.feign;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.dtos.WmNewsPageReqDto;
import com.usian.model.media.pojos.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-wemedia")
public interface WemediaFeign {
    @GetMapping("/wemedia/api/v1/news/one/{id}")
    public ResponseResult findByIdNews(@PathVariable Integer id);

    @PostMapping("/wemedia/api/v1/news/update")
    ResponseResult updateWmNews(WmNews wmNews);

    @GetMapping("/wemedia/api/v1/news/findOne/{id}")
    WmNews findWmUserId(@PathVariable("id") Long id);
    //11/23 全查
    @PostMapping("/wemedia/api/v1/news/list")
    public ResponseResult findPage(@RequestBody WmNewsPageReqDto wmNewsPageReqDto);

    @PostMapping("/wemedia/api/v1/news/updateWmnews")
    public ResponseResult updateStatusAndReason(WmNews wmNews);
}
